<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/2/28
 * Time: 16:31
 */

namespace App\Http\Traits;


use Illuminate\Http\Request;

trait TrainTrait
{
    use BaseTrait;

    // 咖啡馆ID
    protected $cafe_id;
    // 培训ID
    protected $train_id;
    // 培训名称
    protected $name;
    // 培训人数限制
    protected $num;
    // 培训费用
    protected $cost;
    // 联系人
    protected $link_man;
    // 联系方式
    protected $mobile;
    // 备注
    protected $mark;
    // 分页大小
    protected $limit;
    // 显示状态
    protected $status;

    public function __construct(Request $request)
    {
        $this->cafe_id = $request->input('cafe_id', 0);
        $this->train_id = $request->input('train_id', 0);
        $this->name = $request->input('name', '');
        $this->num = $request->input('num', 0);
        $this->cost = $request->input('cost', 0);
        $this->link_man = $request->input('link_man', '');
        $this->mobile = $request->input('mobile', '');
        $this->mark = $request->input('mark', '');
        $this->limit = $request->input('limit', '');
        $this->status = $request->input('status', '');
    }
}